<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>管理员界面</title>
    <link rel="shortcut icon" th:href="@{/logo/favicon.ico}"/>
    <!-- Custom fonts for this template-->
    <link rel="stylesheet" type="text/css" th:href="@{/vendor/fontawesome-free/css/all.min.css}"/>
    <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
          rel="stylesheet">
    <!-- Custom styles for this template-->
    <link rel="stylesheet" type="text/css" th:href="@{/css/sb-admin-2.min.css}"/>
    <!-- Custom styles for this page -->
    <link rel="stylesheet" type="text/css" th:href="@{/vendor/datatables/dataTables.bootstrap4.min.css}"/>
</head>
<style>
    td button{
        margin-right: 8px ;
        width: 40px;
    }
    td{
        border: 1px solid black;
    }
    #table_one td {
        border-top: 1px solid black;
    }
    [contenteditable="false"] {
        color: black;
        font-weight: bold;
    }
    .table th, .table td {
        text-align: center;
        vertical-align: middle !important;
    }
    td img{
        width: 80%;
    }
</style>
<body id="page-top">

<!-- Page Wrapper -->
<div id="wrapper">
    <!-- Sidebar -->
    <div th:if="${role} == 2" style="height: auto;background-color: #224abe;">
        <div  th:replace="commons/admin_sidebar::#accordionSidebar" ></div>
    </div>
    <div th:if="${role} == 4" style="height: auto;background-color: #224abe;">
        <div th:replace="commons/aduit_sidebar::#accordionSidebar"></div>
    </div>
    <div th:if="${role} == 3" style="height: auto;background-color: #224abe;">
        <div th:replace="commons/aduit_sidebar::#accordionSidebar"></div>
    </div>
    <!-- End of Sidebar -->
    <!-- Content Wrapper -->
    <div id="content-wrapper" class="d-flex flex-column">
        <!-- Main Content -->
        <div id="content">
            <!-- Topbar -->
            <div th:replace="commons/admin_navbar::#navbar"></div>
            <!-- End of Topbar -->
            <div th:replace="commons/view_report_modal::#report_modal"></div>
            <!-- Begin Page Content -->
            <div class="container-fluid">
                <!-- DataTales Example -->
                <div class="card shadow mb-4">
                    <div class="card-header py-3">
                        <h6 class="m-0 font-weight-bold text-primary" style="text-align: center">审核报告</h6>
                    </div>
                    <div class="card-header py-3">
                        <select class="chosen-select entrust_content form-control"
                                id="holder"
                                data-placeholder="Choose a State...">
                            <option th:each="holder:${holders}"
                                    th:value="${holder?.userId}">
                                [[${holder?.holder}]]
                            </option>
                        </select>
                    </div>
                    <div class="card-body">
                        <div class="table-responsive">
                            <table class="table table-bordered table-hover text-nowrap" id="dataTable" cellspacing="0">
                                <thead>
                                <tr>
                                    <th>报告id</th>
                                    <th>报告编号</th>
                                    <th>检测日期</th>
                                    <th>检验方法</th>
                                    <th>姓名/单位</th>
                                    <th>联系电话</th>
                                    <th>审核员</th>
                                    <th>状态</th>
                                    <th>下载次数</th>
                                    <th>下载</th>
                                </tr>
                                </thead>
                                <tbody>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /.container-fluid -->
        </div>
        <!-- End of Main Content -->
        <!-- Footer -->
        <div th:replace="commons/footer::#footer"></div>
        <!-- End of Footer -->

    </div>
    <!-- End of Content Wrapper -->

</div>
<!-- End of Page Wrapper -->

<!-- Scroll to Top Button-->
<a class="scroll-to-top rounded" href="#page-top">
    <i class="fas fa-angle-up"></i>
</a>

<!-- Logout Modal-->
<div th:replace="commons/logout::#logoutModal"></div>


<!-- Bootstrap core JavaScript-->
<script type="text/javascript" th:src="@{/vendor/jquery/jquery.min.js}"></script>
<script type="text/javascript" th:src="@{/vendor/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script type="text/javascript" th:src="@{/js/admin_commons.js}"></script>
<!-- Core plugin JavaScript-->
<script type="text/javascript" th:src="@{/vendor/jquery-easing/jquery.easing.min.js}"></script>
<!-- Custom scripts for all pages-->
<script type="text/javascript" th:src="@{/js/sb-admin-2.min.js}"></script>
<!-- Page level plugins -->
<script type="text/javascript" th:src="@{/vendor/datatables/jquery.dataTables.min.js}"></script>
<script type="text/javascript" th:src="@{/vendor/datatables/dataTables.bootstrap4.min.js}"></script>
<script type="text/javascript" th:src="@{/js/demo/datatables-demo.js}"></script>
<script type="text/javascript" th:src="@{/js/admin_print_report.js}"></script>
<!--modal数据装载js modal提交修改-->
<script type="text/javascript" th:src="@{/js/report_modal.js}"></script>
<script>
    function view_report_info_token(id,status) {
        if("[[${modify_token}]]" != "" && "[[${modify_token}]]" == "true"){
            window.open("/user/get-save-report?rid="+id+"&status="+status+"&ten="+localStorage.getItem("token"));
            // window.location.href = "/user/get-save-report?rid="+id+"&status="+status+"&ten="+localStorage.getItem("token");
            return false;
        }else{
            view_report_info(id,status);
        }
    }
</script>
</body>
<script>
    $("#holder").change(function () {
        if ($(this).val() != 0) {
            load_datatable_print("/admin/view-holder?status=6&hid=" + $(this).val());
        } else {
            load_datatable_print("/admin/view-all?status=6");
        }
    });
    $(function () {
        load_datatable_print("/admin/view-all?status=6");
    })
</script>
</html>
